When a needle bed is racked by a racking device, the racking device is moved by 0.5 pitch, 1 pitch or a larger pitch. Since a yarn and a knitted fabric are caught on needles at this movement, the yarn pulls the needle in some knitted structure, and the needle is bent, with the result that even if the needle bed is moved by predetermined pitches, the needle is not shifted to the intended position and the actions of corresponding needles are inhibited. As means for overcoming this disadvantage, there has been proposed a method in which an adjusting piece is mounted on a cam for reciprocative movement of the needle bed and the quantity of displacement of the needle bed is adjusted according to the position of this adjusting piece. However, no satisfactory results can be obtained according to this method.